//package com.yxw.web;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//@WebServlet("/hello")
//public class Servlet01 extends HttpServlet {
//
//    @Override
//    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        System.out.println("hello servlet!");
//
//        req.getRequestDispatcher("/success.html").forward(req,resp);
//    }
//
//    @Override
//    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        System.out.println("Post 请求");
//        String username = req.getParameter("username");
//        String password = req.getParameter("password");
//        System.out.println("用户名: " + username);
//        System.out.println("密码: " + password);
//        resp.sendRedirect("/success.html");
//    }
//}
